Webexception handling, possible fix for #132#159
Closed
Thorium wants to merge 4 commits intofsprojects:masterfrom
Closed
Webexception handling, possible fix for #132#159Thorium wants to merge 4 commits intofsprojects:masterfrom
Thorium wants to merge 4 commits intofsprojects:masterfrom
Conversation
… at response body.
# Conflicts: # src/SwaggerProvider.DesignTime/Provider.SwaggerClient.fs
sergey-tihon
reviewed
Jun 7, 2020
| SwaggerProvider.Internal.SchemaReader.readSchemaPath "" filePath | ||
| |> Async.RunSynchronously | ||
|
|
||
| failwith "External definition of this path item is not supported yet" |
Member
There was a problem hiding this comment.
@Thorium few questions here
- Why to use
basePathinstead ofschemaPathRaw? I would expect that$refif relative to schema rather than API base path - What is point to request schema before raising exception?
Member
Author
There was a problem hiding this comment.
Sorry, with this commit was an earlier commit for the other PR #152
and with that I the failwith is still the old code, the Parsers.fs changes can be ignored.
sergey-tihon
reviewed
Jun 7, 2020
| else err.ToString() | ||
| | Choice2Of2 e -> return failwith(e.ToString()) | ||
| | false -> | ||
| return schemaPathRaw |> IO.File.ReadAllText |
Member
There was a problem hiding this comment.
if this line is inside async we can replace in by
use sr = new StreamReader(schemaPathRaw)
return! sr.ReadToEndAsync() |> Async.AwaitTask
Member
Author
|
I'll close this and redo the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reading the response body of non-ok web-request.
This could help for #132
My request didn't actually fail, so needs testing.